package com.ruoyi.project.mahjong.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.mahjong.mapper.TShopsMapper;
import com.ruoyi.project.mahjong.domain.TShops;
import com.ruoyi.project.mahjong.service.ITShopsService;

/**
 * 店铺Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-10-07
 */
@Service
public class TShopsServiceImpl implements ITShopsService 
{
    @Autowired
    private TShopsMapper tShopsMapper;

    /**
     * 查询店铺
     * 
     * @param id 店铺ID
     * @return 店铺
     */
    @Override
    public TShops selectTShopsById(Long id)
    {
        return tShopsMapper.selectTShopsById(id);
    }

    /**
     * 查询店铺列表
     * 
     * @param tShops 店铺
     * @return 店铺
     */
    @Override
    public List<TShops> selectTShopsList(TShops tShops)
    {
        return tShopsMapper.selectTShopsList(tShops);
    }

    /**
     * 新增店铺
     * 
     * @param tShops 店铺
     * @return 结果
     */
    @Override
    public int insertTShops(TShops tShops)
    {
        tShops.setCreateTime(DateUtils.getNowDate());
        return tShopsMapper.insertTShops(tShops);
    }

    /**
     * 修改店铺
     * 
     * @param tShops 店铺
     * @return 结果
     */
    @Override
    public int updateTShops(TShops tShops)
    {
        tShops.setUpdateTime(DateUtils.getNowDate());
        return tShopsMapper.updateTShops(tShops);
    }

    /**
     * 批量删除店铺
     * 
     * @param ids 需要删除的店铺ID
     * @return 结果
     */
    @Override
    public int deleteTShopsByIds(Long[] ids)
    {
        return tShopsMapper.deleteTShopsByIds(ids);
    }

    /**
     * 删除店铺信息
     * 
     * @param id 店铺ID
     * @return 结果
     */
    @Override
    public int deleteTShopsById(Long id)
    {
        return tShopsMapper.deleteTShopsById(id);
    }
}
